package com.wnhz.wnmap.order.controller;

import com.wnhz.wnmap.common.result.HttpResp;
import com.wnhz.wnmap.order.service.IOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "订单接口")
@RestController
@RequestMapping("/api/order")
public class OrderController {
    @Autowired
    private IOrderService ios;

    @ApiOperation(value = "orderSeats",notes = "订单的订座接口")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "auditId", value = "影院id", required = true),
            @ApiImplicitParam(name = "seats", value = "作为数量", required = true)
    })
    @PutMapping("/orderSeats")
    public HttpResp orderSeats(long auditId, int seats){
            ios.orderSeats(auditId,seats);
            return HttpResp.success("影院订座业务完成...");
    }
}
